<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>特殊${crflag}信息</title>
<script type="text/javascript">
//保存并查询
function doIns(){
	if(check()){
		if(confirm("确认保存信息?")){
			document.all.operate.value = "insinfo";
			document.forms[0].submit();
		}
	}
}
 //限制添加快捷内容的字数  
var maxLength =30; 
function MaxInput(fo,len) {
	if(len!=""){
		maxLength=len;
	}
	if (fo.value.length > maxLength) {
		alert("输入内容过多！");
		fo.value = fo.value.substring(0, maxLength);
	}
}
//查看历史
function doback(){
	document.all["operate"].value = "";
	document.forms[0].submit();
	//doclose();
	//parent.doQueryMess("<%=path %>/stockspecial.action?crflag=${crflag}&mtp=${mtp}","","600","300");
}
function dovalue(obj){
	if(obj.value!=""){
		document.all["ps.goodsname"].value = obj.options[obj.selectedIndex].innerText;
		comdwr.doSel_Info("ST02"," and goodsid ='"+obj.value+"'",function(map){
			document.all["goodstype"].value = map.goodstype;
			document.all["standard"].value  = map.standard;
		});
	}else{
		document.all["ps.goodsname"].value = "";
		document.all["goodstype"].value = "";
		document.all["standard"].value  = "";
	}
}
</script>
</head>
<body>
<form action="<%=path %>/stockspecial.action" method="post">
<table width="100%" height="99%" border="0" cellpadding="0" cellspacing="0" >
    <tr>
      <td class="MainBody_body" style="padding: 0 10 10 0;"><input name="operate" type="hidden" value=""/>
			<input name="mtp" type="hidden" value="${mtp}"/>
          <input name="ps.createuser" type="hidden" value="${sessionScope.admin_user.personid}"/>
          <input name="ps.crflag" type="hidden" value="${crflag}"/>
          <input name="ps.makingtype" type="hidden" value="${mtp}"/>
          <div align="right" style="padding: 10 50 10 0;">
			<input type="button" class="btn" value="保 存" onclick="doIns()"/>&nbsp;&nbsp;
			<input type="button" class="btn" value="查看历史" onclick="doback()"/>&nbsp;&nbsp;
			<input type="button" class="btn" value="关 闭" onclick="doclose()"/>&nbsp;&nbsp;</div>
          <table  border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
                <tr>
                  <td colspan="4" class="bg_title">特 殊 入 库 信 息</td>
                </tr>
                <tr>
                  <th width="20%" nowrap="nowrap">物料名称</th> 
                  <td width="30%"><select name="ps.goodsid" style="width: 98%" title="物料名称" onchange="dovalue(this)" check="checkBlank">
                  	<option value="" >请选择</option>
                  	<c:forEach var="row" varStatus="status" items="${list}">
					<option value="${row.goodsid }" >${row.goodsname }</option>
					</c:forEach>
                  </select><input name="ps.goodsname" type="hidden" value=""/></td>
                  <th width="20%" nowrap="nowrap">${crflag}数量</th>
                  <td width="30%" ><input name="ps.rightnum" type="text" maxlength="50" title="${crflag}数量" check="checkBlank,checkNaN" class="notnull"/></td>
                </tr>
                <tr>
                  <th nowrap="nowrap">种类</th> 
                  <td ><input name="goodstype" type="text" class="readinput" readonly /></td>
                  <th nowrap="nowrap">规格</th>
                  <td ><input name="standard" type="text" class="readinput" readonly /></td>
                </tr>
                <tr>
                  <th align="center" nowrap="nowrap" >备注信息</th> 
                  <td colspan="3"><textarea name="ps.remark" style="width: 100%;" rows="6" onblur="MaxInput(this,100)"></textarea></td>
                </tr>
            </table>
		</td>
	</tr>
</table>
<script type="text/javascript">
</script>
</form>
</body>
</html>